package com.huilunyingshi.videoprovider.dao;

import com.huilunyingshi.videoprovider.entity.TFilm;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Mapper
public interface TFilmMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TFilm record);

    int insertSelective(TFilm record);

    TFilm selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TFilm record);

    int updateByPrimaryKey(TFilm record);

    /**
     * 查询总条数
     * @return
     */
    int getFilmListCount();

    ArrayList<TFilm> getFilmList(@Param("keyword") String keyword, @Param("start")Integer start, @Param("pageSize")Integer pageSize);

    //单个查询详细
    TFilm getFilm(@Param("id")Long id);

    //根据类型查询详情
    List<Map<String,Object>> getFilmTypeList(@Param("lid") Long lid , @Param("start")Integer start, @Param("pageSize")Integer pageSize);

    //根据多个类型查询详情
    List<Map<String,Object>>  getFilmTypeLists(@Param("lid") Long lid,@Param("frtId") Long frtId,@Param("areaId")Long areaId,@Param("fsId")Long fsId,@Param("start")Integer start, @Param("pageSize")Integer pageSize);

}